package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the MEDCINE_DETAILS database table.
 * 
 */
@Entity
@Table(name="MEDCINE_DETAILS")
@NamedQuery(name="MedcineDetail.findAll", query="SELECT m FROM MedcineDetail m")
public class MedcineDetail implements Serializable {
	@Override
	public String toString() {
		return "MedcineDetail [medcineName=" + medcineName + "]";
	}

	public MedcineDetail(long medcineId, String medcineName) {
		super();
		this.medcineId = medcineId;
		this.medcineName = medcineName;
	}

	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="MEDCINE_ID")
	@SequenceGenerator(initialValue=100,allocationSize=1,name="MEDCINE_ID_GENERATOR", sequenceName="SEQID")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MEDCINE_ID_GENERATOR")
	private long medcineId;

	public MedcineDetail(long medcineId, BigDecimal medcineBaozhiqi, String medcineEffect, String medcineImage,
			String medcineName, String medcineNote, BigDecimal medcinePrice, MedcineCompany medcineCompany,
			MedcineType medcineType) {
		super();
		this.medcineId = medcineId;
		this.medcineBaozhiqi = medcineBaozhiqi;
		this.medcineEffect = medcineEffect;
		this.medcineImage = medcineImage;
		this.medcineName = medcineName;
		this.medcineNote = medcineNote;
		this.medcinePrice = medcinePrice;
		this.medcineCompany = medcineCompany;
		this.medcineType = medcineType;
	}

	@Column(name="MEDCINE_BAOZHIQI")
	private BigDecimal medcineBaozhiqi;

	@Column(name="MEDCINE_EFFECT")
	private String medcineEffect;

	@Column(name="MEDCINE_IMAGE")
	private String medcineImage;

	@Column(name="MEDCINE_NAME")
	private String medcineName;

	@Column(name="MEDCINE_NOTE")
	private String medcineNote;

	@Column(name="MEDCINE_PRICE")
	private BigDecimal medcinePrice;

	

	//bi-directional many-to-one association to DrugstorageBuymedcineDetail
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstorageBuymedcineDetail> drugstorageBuymedcineDetails;

	//bi-directional many-to-one association to DrugstorageDemage
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstorageDemage> drugstorageDemages;

	//bi-directional many-to-one association to DrugstorageGetdrugsDetail
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstorageGetdrugsDetail> drugstorageGetdrugsDetails;

	//bi-directional many-to-one association to DrugstorageHasdrug
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstorageHasdrug> drugstorageHasdrugs;

	//bi-directional many-to-one association to DrugstorageLackDrug
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstorageLackDrug> drugstorageLackDrugs;

	//bi-directional many-to-one association to DrugstorageReminddrug
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstorageReminddrug> drugstorageReminddrugs;

	//bi-directional many-to-one association to DrugstoreDemage
	@OneToMany(mappedBy="medcineDetail")
	private List<DrugstoreDemage> drugstoreDemages;

	//bi-directional many-to-one association to MedcinestoreAcceptdrug
	@OneToMany(mappedBy="medcineDetail")
	private List<MedcinestoreAcceptdrug> medcinestoreAcceptdrugs;

	//bi-directional many-to-one association to MedcinestoreHasdrug
	@OneToMany(mappedBy="medcineDetail")
	private List<MedcinestoreHasdrug> medcinestoreHasdrugs;

	//bi-directional many-to-one association to MedcinestoreLackDrug
	@OneToMany(mappedBy="medcineDetail")
	private List<MedcinestoreLackDrug> medcinestoreLackDrugs;

	//bi-directional many-to-one association to MedcinestoreRemind
	@OneToMany(mappedBy="medcineDetail")
	private List<MedcinestoreRemind> medcinestoreReminds;

	//bi-directional many-to-one association to MedcinestoreSendmedcine
	@OneToMany(mappedBy="medcineDetail")
	private List<MedcinestoreSendmedcine> medcinestoreSendmedcines;

	//bi-directional many-to-one association to MedcineCompany
	@ManyToOne
	@JoinColumn(name="MEDCINECOMPANY_ID")
	private MedcineCompany medcineCompany;

	//bi-directional many-to-one association to MedcineType
	@ManyToOne
	@JoinColumn(name="MEDCINETYPE_ID")
	private MedcineType medcineType;

	//bi-directional many-to-one association to SendmedcineDrugstoreDetail
	@OneToMany(mappedBy="medcineDetail")
	private List<SendmedcineDrugstoreDetail> sendmedcineDrugstoreDetails;

	//bi-directional many-to-one association to StorageWithdrawelDetail
	@OneToMany(mappedBy="medcineDetail")
	private List<StorageWithdrawelDetail> storageWithdrawelDetails;

	public MedcineDetail() {
	}

	public long getMedcineId() {
		return this.medcineId;
	}

	public void setMedcineId(long medcineId) {
		this.medcineId = medcineId;
	}

	public BigDecimal getMedcineBaozhiqi() {
		return this.medcineBaozhiqi;
	}

	public void setMedcineBaozhiqi(BigDecimal medcineBaozhiqi) {
		this.medcineBaozhiqi = medcineBaozhiqi;
	}

	public String getMedcineEffect() {
		return this.medcineEffect;
	}

	public void setMedcineEffect(String medcineEffect) {
		this.medcineEffect = medcineEffect;
	}

	public String getMedcineImage() {
		return this.medcineImage;
	}

	public void setMedcineImage(String medcineImage) {
		this.medcineImage = medcineImage;
	}

	public String getMedcineName() {
		return this.medcineName;
	}

	public void setMedcineName(String medcineName) {
		this.medcineName = medcineName;
	}

	public String getMedcineNote() {
		return this.medcineNote;
	}

	public void setMedcineNote(String medcineNote) {
		this.medcineNote = medcineNote;
	}

	public BigDecimal getMedcinePrice() {
		return this.medcinePrice;
	}

	public void setMedcinePrice(BigDecimal medcinePrice) {
		this.medcinePrice = medcinePrice;
	}

	public List<DrugstorageBuymedcineDetail> getDrugstorageBuymedcineDetails() {
		return this.drugstorageBuymedcineDetails;
	}

	public void setDrugstorageBuymedcineDetails(List<DrugstorageBuymedcineDetail> drugstorageBuymedcineDetails) {
		this.drugstorageBuymedcineDetails = drugstorageBuymedcineDetails;
	}

	public DrugstorageBuymedcineDetail addDrugstorageBuymedcineDetail(DrugstorageBuymedcineDetail drugstorageBuymedcineDetail) {
		getDrugstorageBuymedcineDetails().add(drugstorageBuymedcineDetail);
		drugstorageBuymedcineDetail.setMedcineDetail(this);

		return drugstorageBuymedcineDetail;
	}

	public DrugstorageBuymedcineDetail removeDrugstorageBuymedcineDetail(DrugstorageBuymedcineDetail drugstorageBuymedcineDetail) {
		getDrugstorageBuymedcineDetails().remove(drugstorageBuymedcineDetail);
		drugstorageBuymedcineDetail.setMedcineDetail(null);

		return drugstorageBuymedcineDetail;
	}

	public List<DrugstorageDemage> getDrugstorageDemages() {
		return this.drugstorageDemages;
	}

	public void setDrugstorageDemages(List<DrugstorageDemage> drugstorageDemages) {
		this.drugstorageDemages = drugstorageDemages;
	}

	public DrugstorageDemage addDrugstorageDemage(DrugstorageDemage drugstorageDemage) {
		getDrugstorageDemages().add(drugstorageDemage);
		drugstorageDemage.setMedcineDetail(this);

		return drugstorageDemage;
	}

	public DrugstorageDemage removeDrugstorageDemage(DrugstorageDemage drugstorageDemage) {
		getDrugstorageDemages().remove(drugstorageDemage);
		drugstorageDemage.setMedcineDetail(null);

		return drugstorageDemage;
	}

	public List<DrugstorageGetdrugsDetail> getDrugstorageGetdrugsDetails() {
		return this.drugstorageGetdrugsDetails;
	}

	public void setDrugstorageGetdrugsDetails(List<DrugstorageGetdrugsDetail> drugstorageGetdrugsDetails) {
		this.drugstorageGetdrugsDetails = drugstorageGetdrugsDetails;
	}

	public DrugstorageGetdrugsDetail addDrugstorageGetdrugsDetail(DrugstorageGetdrugsDetail drugstorageGetdrugsDetail) {
		getDrugstorageGetdrugsDetails().add(drugstorageGetdrugsDetail);
		drugstorageGetdrugsDetail.setMedcineDetail(this);

		return drugstorageGetdrugsDetail;
	}

	public DrugstorageGetdrugsDetail removeDrugstorageGetdrugsDetail(DrugstorageGetdrugsDetail drugstorageGetdrugsDetail) {
		getDrugstorageGetdrugsDetails().remove(drugstorageGetdrugsDetail);
		drugstorageGetdrugsDetail.setMedcineDetail(null);

		return drugstorageGetdrugsDetail;
	}

	public List<DrugstorageHasdrug> getDrugstorageHasdrugs() {
		return this.drugstorageHasdrugs;
	}

	public void setDrugstorageHasdrugs(List<DrugstorageHasdrug> drugstorageHasdrugs) {
		this.drugstorageHasdrugs = drugstorageHasdrugs;
	}

	public DrugstorageHasdrug addDrugstorageHasdrug(DrugstorageHasdrug drugstorageHasdrug) {
		getDrugstorageHasdrugs().add(drugstorageHasdrug);
		drugstorageHasdrug.setMedcineDetail(this);

		return drugstorageHasdrug;
	}

	public DrugstorageHasdrug removeDrugstorageHasdrug(DrugstorageHasdrug drugstorageHasdrug) {
		getDrugstorageHasdrugs().remove(drugstorageHasdrug);
		drugstorageHasdrug.setMedcineDetail(null);

		return drugstorageHasdrug;
	}

	public List<DrugstorageLackDrug> getDrugstorageLackDrugs() {
		return this.drugstorageLackDrugs;
	}

	public void setDrugstorageLackDrugs(List<DrugstorageLackDrug> drugstorageLackDrugs) {
		this.drugstorageLackDrugs = drugstorageLackDrugs;
	}

	public DrugstorageLackDrug addDrugstorageLackDrug(DrugstorageLackDrug drugstorageLackDrug) {
		getDrugstorageLackDrugs().add(drugstorageLackDrug);
		drugstorageLackDrug.setMedcineDetail(this);

		return drugstorageLackDrug;
	}

	public DrugstorageLackDrug removeDrugstorageLackDrug(DrugstorageLackDrug drugstorageLackDrug) {
		getDrugstorageLackDrugs().remove(drugstorageLackDrug);
		drugstorageLackDrug.setMedcineDetail(null);

		return drugstorageLackDrug;
	}

	public List<DrugstorageReminddrug> getDrugstorageReminddrugs() {
		return this.drugstorageReminddrugs;
	}

	public void setDrugstorageReminddrugs(List<DrugstorageReminddrug> drugstorageReminddrugs) {
		this.drugstorageReminddrugs = drugstorageReminddrugs;
	}

	public DrugstorageReminddrug addDrugstorageReminddrug(DrugstorageReminddrug drugstorageReminddrug) {
		getDrugstorageReminddrugs().add(drugstorageReminddrug);
		drugstorageReminddrug.setMedcineDetail(this);

		return drugstorageReminddrug;
	}

	public DrugstorageReminddrug removeDrugstorageReminddrug(DrugstorageReminddrug drugstorageReminddrug) {
		getDrugstorageReminddrugs().remove(drugstorageReminddrug);
		drugstorageReminddrug.setMedcineDetail(null);

		return drugstorageReminddrug;
	}

	public List<DrugstoreDemage> getDrugstoreDemages() {
		return this.drugstoreDemages;
	}

	public void setDrugstoreDemages(List<DrugstoreDemage> drugstoreDemages) {
		this.drugstoreDemages = drugstoreDemages;
	}

	public DrugstoreDemage addDrugstoreDemage(DrugstoreDemage drugstoreDemage) {
		getDrugstoreDemages().add(drugstoreDemage);
		drugstoreDemage.setMedcineDetail(this);

		return drugstoreDemage;
	}

	public DrugstoreDemage removeDrugstoreDemage(DrugstoreDemage drugstoreDemage) {
		getDrugstoreDemages().remove(drugstoreDemage);
		drugstoreDemage.setMedcineDetail(null);

		return drugstoreDemage;
	}

	public List<MedcinestoreAcceptdrug> getMedcinestoreAcceptdrugs() {
		return this.medcinestoreAcceptdrugs;
	}

	public void setMedcinestoreAcceptdrugs(List<MedcinestoreAcceptdrug> medcinestoreAcceptdrugs) {
		this.medcinestoreAcceptdrugs = medcinestoreAcceptdrugs;
	}

	public MedcinestoreAcceptdrug addMedcinestoreAcceptdrug(MedcinestoreAcceptdrug medcinestoreAcceptdrug) {
		getMedcinestoreAcceptdrugs().add(medcinestoreAcceptdrug);
		medcinestoreAcceptdrug.setMedcineDetail(this);

		return medcinestoreAcceptdrug;
	}

	public MedcinestoreAcceptdrug removeMedcinestoreAcceptdrug(MedcinestoreAcceptdrug medcinestoreAcceptdrug) {
		getMedcinestoreAcceptdrugs().remove(medcinestoreAcceptdrug);
		medcinestoreAcceptdrug.setMedcineDetail(null);

		return medcinestoreAcceptdrug;
	}

	public List<MedcinestoreHasdrug> getMedcinestoreHasdrugs() {
		return this.medcinestoreHasdrugs;
	}

	public void setMedcinestoreHasdrugs(List<MedcinestoreHasdrug> medcinestoreHasdrugs) {
		this.medcinestoreHasdrugs = medcinestoreHasdrugs;
	}

	public MedcinestoreHasdrug addMedcinestoreHasdrug(MedcinestoreHasdrug medcinestoreHasdrug) {
		getMedcinestoreHasdrugs().add(medcinestoreHasdrug);
		medcinestoreHasdrug.setMedcineDetail(this);

		return medcinestoreHasdrug;
	}

	public MedcinestoreHasdrug removeMedcinestoreHasdrug(MedcinestoreHasdrug medcinestoreHasdrug) {
		getMedcinestoreHasdrugs().remove(medcinestoreHasdrug);
		medcinestoreHasdrug.setMedcineDetail(null);

		return medcinestoreHasdrug;
	}

	public List<MedcinestoreLackDrug> getMedcinestoreLackDrugs() {
		return this.medcinestoreLackDrugs;
	}

	public void setMedcinestoreLackDrugs(List<MedcinestoreLackDrug> medcinestoreLackDrugs) {
		this.medcinestoreLackDrugs = medcinestoreLackDrugs;
	}

	public MedcinestoreLackDrug addMedcinestoreLackDrug(MedcinestoreLackDrug medcinestoreLackDrug) {
		getMedcinestoreLackDrugs().add(medcinestoreLackDrug);
		medcinestoreLackDrug.setMedcineDetail(this);

		return medcinestoreLackDrug;
	}

	public MedcinestoreLackDrug removeMedcinestoreLackDrug(MedcinestoreLackDrug medcinestoreLackDrug) {
		getMedcinestoreLackDrugs().remove(medcinestoreLackDrug);
		medcinestoreLackDrug.setMedcineDetail(null);

		return medcinestoreLackDrug;
	}

	public List<MedcinestoreRemind> getMedcinestoreReminds() {
		return this.medcinestoreReminds;
	}

	public void setMedcinestoreReminds(List<MedcinestoreRemind> medcinestoreReminds) {
		this.medcinestoreReminds = medcinestoreReminds;
	}

	public MedcinestoreRemind addMedcinestoreRemind(MedcinestoreRemind medcinestoreRemind) {
		getMedcinestoreReminds().add(medcinestoreRemind);
		medcinestoreRemind.setMedcineDetail(this);

		return medcinestoreRemind;
	}

	public MedcinestoreRemind removeMedcinestoreRemind(MedcinestoreRemind medcinestoreRemind) {
		getMedcinestoreReminds().remove(medcinestoreRemind);
		medcinestoreRemind.setMedcineDetail(null);

		return medcinestoreRemind;
	}

	public List<MedcinestoreSendmedcine> getMedcinestoreSendmedcines() {
		return this.medcinestoreSendmedcines;
	}

	public void setMedcinestoreSendmedcines(List<MedcinestoreSendmedcine> medcinestoreSendmedcines) {
		this.medcinestoreSendmedcines = medcinestoreSendmedcines;
	}

	public MedcinestoreSendmedcine addMedcinestoreSendmedcine(MedcinestoreSendmedcine medcinestoreSendmedcine) {
		getMedcinestoreSendmedcines().add(medcinestoreSendmedcine);
		medcinestoreSendmedcine.setMedcineDetail(this);

		return medcinestoreSendmedcine;
	}

	public MedcinestoreSendmedcine removeMedcinestoreSendmedcine(MedcinestoreSendmedcine medcinestoreSendmedcine) {
		getMedcinestoreSendmedcines().remove(medcinestoreSendmedcine);
		medcinestoreSendmedcine.setMedcineDetail(null);

		return medcinestoreSendmedcine;
	}

	public MedcineCompany getMedcineCompany() {
		return this.medcineCompany;
	}

	public void setMedcineCompany(MedcineCompany medcineCompany) {
		this.medcineCompany = medcineCompany;
	}

	public MedcineType getMedcineType() {
		return this.medcineType;
	}

	public void setMedcineType(MedcineType medcineType) {
		this.medcineType = medcineType;
	}

	public List<SendmedcineDrugstoreDetail> getSendmedcineDrugstoreDetails() {
		return this.sendmedcineDrugstoreDetails;
	}

	public void setSendmedcineDrugstoreDetails(List<SendmedcineDrugstoreDetail> sendmedcineDrugstoreDetails) {
		this.sendmedcineDrugstoreDetails = sendmedcineDrugstoreDetails;
	}

	public SendmedcineDrugstoreDetail addSendmedcineDrugstoreDetail(SendmedcineDrugstoreDetail sendmedcineDrugstoreDetail) {
		getSendmedcineDrugstoreDetails().add(sendmedcineDrugstoreDetail);
		sendmedcineDrugstoreDetail.setMedcineDetail(this);

		return sendmedcineDrugstoreDetail;
	}

	public SendmedcineDrugstoreDetail removeSendmedcineDrugstoreDetail(SendmedcineDrugstoreDetail sendmedcineDrugstoreDetail) {
		getSendmedcineDrugstoreDetails().remove(sendmedcineDrugstoreDetail);
		sendmedcineDrugstoreDetail.setMedcineDetail(null);

		return sendmedcineDrugstoreDetail;
	}

	public List<StorageWithdrawelDetail> getStorageWithdrawelDetails() {
		return this.storageWithdrawelDetails;
	}

	public void setStorageWithdrawelDetails(List<StorageWithdrawelDetail> storageWithdrawelDetails) {
		this.storageWithdrawelDetails = storageWithdrawelDetails;
	}

	public StorageWithdrawelDetail addStorageWithdrawelDetail(StorageWithdrawelDetail storageWithdrawelDetail) {
		getStorageWithdrawelDetails().add(storageWithdrawelDetail);
		storageWithdrawelDetail.setMedcineDetail(this);

		return storageWithdrawelDetail;
	}

	public StorageWithdrawelDetail removeStorageWithdrawelDetail(StorageWithdrawelDetail storageWithdrawelDetail) {
		getStorageWithdrawelDetails().remove(storageWithdrawelDetail);
		storageWithdrawelDetail.setMedcineDetail(null);

		return storageWithdrawelDetail;
	}


}